<?php
namespace app\api\model;
use app\common\model\User as UserModel;
use think\Db;

class User extends UserModel
{
    public function getTypeAttr($value,$data){

        $types = [1=>'学生',2=>'老师',3=>'工人'];
        return $types[$data['type']];
    }
}